<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>dc-example</title>
    <script src="/libs/dc-sdk/dc.min.js"></script>
    <link href="/libs/dc-sdk/dc.min.css" type="text/css" rel="stylesheet" />
    <link href="../index.css" type="text/css" rel="stylesheet" />
  </head>

  <body>
    <div id="viewer-container" class="viewer-container"></div>
    <script>
      DC.config.baseUrl = '../libs/dc-sdk/resources/'
      let viewer = new DC.Viewer('viewer-container')
      let baseLayer = DC.ImageryLayerFactory.createAMapImageryLayer({
        style: 'img',
        crs: 'WGS84',
      })
      viewer.addBaseLayer(baseLayer)
      let weather = new DC.Weather(viewer)
      weather.cloud.enable = true
      weather.cloud.rotateAmount = 0.04
      let globeRotate = new DC.GlobeRotate(viewer, {
        duration: 3,
        callback: () => {
          viewer.flyToPosition(
            new DC.Position(120.38105869, 31.10115627, 1e5, 0, -90)
          )
        },
      })
      globeRotate.start()
    </script>
  </body>
</html>
